<!--{include header_html}-->
<script language="javascript">
    //刷新验证码
    function reloadCaptcha(obj)
    {
        var src = obj.src+'&t=' + new Date().getTime();
        var img = '<img src="'+src+'" alt="点击刷新验证码" onclick="reloadCaptcha(this);" align="absmiddle" />';
        $('#captcha_img').html(img);
        return true;
    }

    //检查表单数据的合法性
    function formCheck()
	{
		
        if($('#login_name').val() == '')
		{
			wrong('请填用户名！');
			return false;
		}
		if($('#login_passwd').val() == '')
		{
			wrong('请填写密码！');
			return false;
		}
        if($('#login_passwd').val().length < 6 || $('#login_passwd').val().length > 20)
		{
			wrong('输入的密码位数有误！');
			return false;
		}
        if($('#login_captcha').val() == '')
		{
			wrong('请填写验证码！');
			return false;
		}
		
		return true;
	}

	//处理表单
	function formResult(res, status)
	{
		//alert(res);
		if(status == 'success')
		{
			if(res == 1)
			{
				location.href = $('#back_url').val();
				return true;
			}
            else if(res == -10)
			{
				wrong('验证码不能为空！');
				return false;
			}
			else if(res == -11)
			{
				wrong('用户名不能为空！');
				return false;
			}
			else if(res == -12)
			{
				wrong('密码不能为空！');
				return false;
			}
            else if(res == -13)
			{
				wrong('验证码不正确！');
				return false;
			}
			else if(res == -2)
			{
				wrong('密码不正确！');
				return false;
			}
            else if(res == -1)
			{
				wrong('用户名不存在！');
				return false;
			}
			else
			{
				wrong('系统异常，请联系管理员！');
				return false;
			}
		}
    	else
		{
			wrong('网络异常，请检查网络连接！');
		}
		return true;
	}

</script>
<div class="login_div">
	<div class="login_bg">
		我们不谈理想<br />
		&nbsp;&nbsp;&nbsp;&nbsp;只热爱生活 ^_^
	</div>
	<div class="login_divp">
		<div class="login_dd">
			<div class="login_dd_top"></div>
			<div class="login_dd_body">
			<form name="login_form" id="login_form" method="post" action="" class="ajaxForm">
				<h1>管理入口</h1>
				<ul class="form_name">
					<li>用户名</li>
					<li>密&nbsp;&nbsp;&nbsp;码</li>
					<li id="captcha_name" style="display:block">验证码</li>
				</ul>
				<ul class="form_value">
					<li><input type="text" name="login_name" id="login_name" class="cont" /></li>
					<li><input type="password" name="login_passwd" id="login_passwd" class="cont" /></li>
					<li id="captcha_value" style="display:block">
					<input type="text" name="login_captcha" id="login_captcha" maxlength="4" style="width:60px;" class="cont" />
					<a id="captcha_img" href="javascript:;" title="点击刷新验证码" style="margin:0 5px;"><img src="${getUrl('sysindex','captcha',array('l'=>70,'w'=>75,'h'=>25,'sn'=>'login'))}" alt="点击刷新验证码" onclick="reloadCaptcha(this)" align="absmiddle" /></a>
					</li>
					<li>
                    <input type="hidden" name="back_url" id="back_url" value="{$backurl}" />
					<input type="submit" name="login_submit" id="login_submit" value="登 录" class="but" />&nbsp;&nbsp;&nbsp;&nbsp;
					<input type="reset" name="login_reset" id="login_reset" value="取 消" class="but" />
					</li>
				</ul>
			</form>
			</div>
			<div class="login_dd_bot"></div>
		</div>
	</div>
</div>

<!--{include footer}-->
